<template>
  <div>
    <u-parse :content="article" @preview="preview" @navigate="navigate" ></u-parse>
  </div>
</template>

<script>
import uParse from '@/components/u-parse/u-parse.vue'
import http from '@/api/api.js'

export default {
  components: {
    uParse
  },
  data () {
    return {
      article: '<div>暂无数据</div>'
    }
  },
  onLoad(option) {
	  http.readNews(option.id).then(res =>{
		  console.log(res)
	  })
  },
  methods: {
    preview(src, e) {
      // do something
    },
    navigate(href, e) {
      // do something
    }
  }
}
</script>

<style>
@import url("@/components/u-parse/u-parse.css");
</style>
